package org.visionlibrary.image.filters.binarization;
//package kar.image.processor.binarization;
//
//import kar.image.Image;
//import kar.image.processor.ImageProcessor;
//
//public class StandardBinarizationProcessor implements ImageProcessor{
//
//	private final int threshold;
//
//	public StandardBinarizationProcessor(int threshold){
//		if(threshold < 0 || threshold > 255){
//			throw new IllegalArgumentException("Binarization threshold must be between 0 and 255");
//		}
//		this.threshold = threshold;
//	}
//	
//	public Image process(Image img) {
//		Image resultImg = img.cloneEmpty();
//		for (int y = 0; y < img.getHeight(); y++) {
//			for (int x = 0; x < img.getWidth(); x++) {
//				int color = ( img.getRGB(x, y) & 0xff ) < this.threshold ? 0x0 : 0xffffff;
//				resultImg.setRGB(x, y, color);
//			}
//		}
//		return resultImg;
//	}
//
//}
